home *** CD-ROM | disk | FTP | other *** search
- /* Script for connecting to CompuServe */
-
- char AccountNumber[40];
- char AccountPassword[40];
- char PhoneNumber[40];
-
- main()
- {
- Cls();
- Echo("Please Wait . . .\r\n");
- Echo("Logging on CompuServe\r\n");
- LocalEcho(0);
- Data(7);
- Parity('E');
- Stop("1");
-
- StrCpy(CompuAcct(), AccountNumber);
- StrCpy(CompuPass(), AccountPassword);
- if (!AccountNumber[0] || !AccountPassword[0])
- {
- Echo("Account information incomplete!\r\n");
- return;
- }
- if (CompuNetwork() == 0)
- Compu();
- else if (CompuNetwork() == 1)
- Tele();
- else if (CompuNetwork() == 2)
- Tym();
- In("ID:", 15);
- Out(AccountNumber);
- Out("\r");
- In("word:", 15);
- Out(AccountPassword);
- Out("\r");
- }
-
- ScriptOut(char *string)
- {
- Echo(string);
- Out(string);
- }
-
- Compu()
- {
- Echo("At 7-E-1\r\n");
- StrCpy(CompuPhone(), PhoneNumber);
- if (PhoneNumber[0])
- Dial(PhoneNumber);
- else
- Echo("No phone number specified in Services Setup!\r\n");
- Wait(2);
- Out("\r");
- In("Name:", 15);
- Out("CIS\r");
- }
-
- Tele()
- {
- Echo("Via Telenet, At 7-E-1\r\n");
- StrCpy(TelenetPhone(), PhoneNumber);
- if (PhoneNumber[0])
- Dial(PhoneNumber);
- else
- Echo("No phone number specified in Services Setup!\r\n");
- Wait(1);
- if ((CurrentBaud() == 300) || (CurrentBaud() == 1200))
- Out("\r");
- else
- Out("@");
- Wait(1);
- Out("\r");
- In("TERMINAL=", 10);
- Out("\r");
- In("@", 10);
- Out("C 202202\r");
- }
-
- Tym()
- {
- Echo("Via Tymnet, 7-E-1\r\n");
- StrCpy(TymnetPhone(), PhoneNumber);
- if (PhoneNumber[0])
- Dial(PhoneNumber);
- else
- Echo("No phone number specified in Services Setup!\r\n");
- Wait(2);
- Out("A");
- In("in", 15);
- Out("CPS");
- Out("\r");
- }
-
-